import request from '@/utils/request'

// 获取聊天历史记录
export function getChatHistory(params) {
  return request({
    url: '/chat/history',
    method: 'get',
    params
  })
}

// 获取未读消息数量
export function getUnreadCount() {
  return request({
    url: '/chat/unread',
    method: 'get'
  })
}

// 标记消息为已读
export function markAsRead(data) {
  return request({
    url: '/chat/read',
    method: 'post',
    data
  })
}